<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    
    <title>NumPy Reference &mdash; NumPy v1.18 Manual</title>
    
    <link rel="stylesheet" type="text/css" href="../_static/css/spc-bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../_static/css/spc-extend.css">
    <link rel="stylesheet" href="../_static/scipy.css" type="text/css" >
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" >
    <link rel="stylesheet" href="../_static/graphviz.css" type="text/css" >
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.18.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script type="text/javascript" src="../_static/js/copybutton.js"></script>
    <link rel="author" title="About these documents" href="../about.html" >
    <link rel="index" title="Index" href="../genindex.html" >
    <link rel="search" title="Search" href="../search.html" >
    <link rel="top" title="NumPy v1.18 Manual" href="../index.html" >
    <link rel="next" title="Array objects" href="arrays.html" >
    <link rel="prev" title="Beyond the Basics" href="../user/c-info.beyond-basics.html" > 
  </head>
  <body>
<div class="container">
  <div class="top-scipy-org-logo-header" style="background-color: #a2bae8;">
    <a href="../index.html">
      <img border=0 alt="NumPy" src="../_static/numpy_logo.png"></a>
    </div>
  </div>
</div>


    <div class="container">
      <div class="main">
        
	<div class="row-fluid">
	  <div class="span12">
	    <div class="spc-navbar">
              
    <ul class="nav nav-pills pull-left">
        <li class="active"><a href="https://numpy.org/">NumPy.org</a></li>
        <li class="active"><a href="https://numpy.org/doc">Docs</a></li>
        
        <li class="active"><a href="../index.html">NumPy v1.18 Manual</a></li>
        
 
    </ul>
              
              
    <ul class="nav nav-pills pull-right">
      <li class="active">
        <a href="../genindex.html" title="General Index"
           accesskey="I">index</a>
      </li>
      <li class="active">
        <a href="arrays.html" title="Array objects"
           accesskey="N">next</a>
      </li>
      <li class="active">
        <a href="../user/c-info.beyond-basics.html" title="Beyond the Basics"
           accesskey="P">previous</a>
      </li>
    </ul>
              
	    </div>
	  </div>
	</div>
        

	<div class="row-fluid">
      <div class="spc-rightsidebar span3">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">NumPy Reference</a><ul>
<li><a class="reference internal" href="#acknowledgements">Acknowledgements</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="../user/c-info.beyond-basics.html"
                        title="previous chapter">Beyond the Basics</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="arrays.html"
                        title="next chapter">Array objects</a></p>
<div id="searchbox" style="display: none" role="search">
  <h4>Quick search</h4>
    <div>
    <form class="search" action="../search.html" method="get">
      <input type="text" style="width: inherit;" name="q" />
      <input type="submit" value="search" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
          <div class="span9">
            
        <div class="bodywrapper">
          <div class="body" id="spc-section-body">
            
  <div class="section" id="numpy-reference">
<span id="reference"></span><h1>NumPy Reference<a class="headerlink" href="#numpy-reference" title="Permalink to this headline">¶</a></h1>
<dl class="field-list simple">
<dt class="field-odd">Release</dt>
<dd class="field-odd"><p>1.18</p>
</dd>
<dt class="field-even">Date</dt>
<dd class="field-even"><p>February 20, 2020</p>
</dd>
</dl>
<span class="target" id="module-numpy"></span><p>This reference manual details functions, modules, and objects
included in NumPy, describing what they are and what they do.
For learning how to use NumPy, see also <a class="reference internal" href="../user/index.html#user"><span class="std std-ref">NumPy User Guide</span></a>.</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="arrays.html">Array objects</a><ul>
<li class="toctree-l2"><a class="reference internal" href="arrays.ndarray.html">The N-dimensional array (<code class="xref py py-class docutils literal notranslate"><span class="pre">ndarray</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="arrays.scalars.html">Scalars</a></li>
<li class="toctree-l2"><a class="reference internal" href="arrays.dtypes.html">Data type objects (<code class="xref py py-class docutils literal notranslate"><span class="pre">dtype</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="arrays.indexing.html">Indexing</a></li>
<li class="toctree-l2"><a class="reference internal" href="arrays.nditer.html">Iterating Over Arrays</a></li>
<li class="toctree-l2"><a class="reference internal" href="arrays.classes.html">Standard array subclasses</a></li>
<li class="toctree-l2"><a class="reference internal" href="maskedarray.html">Masked arrays</a></li>
<li class="toctree-l2"><a class="reference internal" href="arrays.interface.html">The Array Interface</a></li>
<li class="toctree-l2"><a class="reference internal" href="arrays.datetime.html">Datetimes and Timedeltas</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="constants.html">Constants</a></li>
<li class="toctree-l1"><a class="reference internal" href="ufuncs.html">Universal functions (<code class="xref py py-class docutils literal notranslate"><span class="pre">ufunc</span></code>)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="ufuncs.html#broadcasting">Broadcasting</a></li>
<li class="toctree-l2"><a class="reference internal" href="ufuncs.html#output-type-determination">Output type determination</a></li>
<li class="toctree-l2"><a class="reference internal" href="ufuncs.html#use-of-internal-buffers">Use of internal buffers</a></li>
<li class="toctree-l2"><a class="reference internal" href="ufuncs.html#error-handling">Error handling</a></li>
<li class="toctree-l2"><a class="reference internal" href="ufuncs.html#casting-rules">Casting Rules</a></li>
<li class="toctree-l2"><a class="reference internal" href="ufuncs.html#overriding-ufunc-behavior">Overriding Ufunc behavior</a></li>
<li class="toctree-l2"><a class="reference internal" href="ufuncs.html#ufunc"><code class="xref py py-class docutils literal notranslate"><span class="pre">ufunc</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="ufuncs.html#available-ufuncs">Available ufuncs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="routines.html">Routines</a><ul>
<li class="toctree-l2"><a class="reference internal" href="routines.array-creation.html">Array creation routines</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.array-manipulation.html">Array manipulation routines</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.bitwise.html">Binary operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.char.html">String operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.ctypeslib.html">C-Types Foreign Function Interface (<code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.ctypeslib</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.datetime.html">Datetime Support Functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.dtype.html">Data type routines</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.dual.html">Optionally Scipy-accelerated routines (<code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.dual</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.emath.html">Mathematical functions with automatic domain (<code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.emath</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.err.html">Floating point error handling</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.fft.html">Discrete Fourier Transform (<code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.fft</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.financial.html">Financial functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.functional.html">Functional programming</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.help.html">NumPy-specific help functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.indexing.html">Indexing routines</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.io.html">Input and output</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.linalg.html">Linear algebra (<code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.linalg</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.logic.html">Logic functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.ma.html">Masked array operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.math.html">Mathematical functions</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.matlib.html">Matrix library (<code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.matlib</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.other.html">Miscellaneous routines</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.padding.html">Padding Arrays</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.polynomials.html">Polynomials</a></li>
<li class="toctree-l2"><a class="reference internal" href="random/index.html">Random sampling (<code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.random</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.set.html">Set routines</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.sort.html">Sorting, searching, and counting</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.statistics.html">Statistics</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.testing.html">Test Support (<code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.testing</span></code>)</a></li>
<li class="toctree-l2"><a class="reference internal" href="routines.window.html">Window functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="distutils.html">Packaging (<code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.distutils</span></code>)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="distutils.html#modules-in-numpy-distutils">Modules in <code class="xref py py-mod docutils literal notranslate"><span class="pre">numpy.distutils</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="distutils.html#configuration-class">Configuration class</a></li>
<li class="toctree-l2"><a class="reference internal" href="distutils.html#building-installable-c-libraries">Building Installable C libraries</a></li>
<li class="toctree-l2"><a class="reference internal" href="distutils.html#conversion-of-src-files">Conversion of <code class="docutils literal notranslate"><span class="pre">.src</span></code> files</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="distutils_guide.html">NumPy Distutils - Users Guide</a><ul>
<li class="toctree-l2"><a class="reference internal" href="distutils_guide.html#scipy-structure">SciPy structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="distutils_guide.html#requirements-for-scipy-packages">Requirements for SciPy packages</a></li>
<li class="toctree-l2"><a class="reference internal" href="distutils_guide.html#the-setup-py-file">The <code class="docutils literal notranslate"><span class="pre">setup.py</span></code> file</a></li>
<li class="toctree-l2"><a class="reference internal" href="distutils_guide.html#the-init-py-file">The <code class="docutils literal notranslate"><span class="pre">__init__.py</span></code> file</a></li>
<li class="toctree-l2"><a class="reference internal" href="distutils_guide.html#extra-features-in-numpy-distutils">Extra features in NumPy Distutils</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="c-api/index.html">NumPy C-API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="c-api/types-and-structures.html">Python Types and C-Structures</a></li>
<li class="toctree-l2"><a class="reference internal" href="c-api/config.html">System configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="c-api/dtype.html">Data Type API</a></li>
<li class="toctree-l2"><a class="reference internal" href="c-api/array.html">Array API</a></li>
<li class="toctree-l2"><a class="reference internal" href="c-api/iterator.html">Array Iterator API</a></li>
<li class="toctree-l2"><a class="reference internal" href="c-api/ufunc.html">UFunc API</a></li>
<li class="toctree-l2"><a class="reference internal" href="c-api/generalized-ufuncs.html">Generalized Universal Function API</a></li>
<li class="toctree-l2"><a class="reference internal" href="c-api/coremath.html">NumPy core libraries</a></li>
<li class="toctree-l2"><a class="reference internal" href="c-api/deprecations.html">C API Deprecations</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="internals.html">NumPy internals</a><ul>
<li class="toctree-l2"><a class="reference internal" href="internals.code-explanations.html">NumPy C Code Explanations</a></li>
<li class="toctree-l2"><a class="reference internal" href="alignment.html">Memory Alignment</a></li>
<li class="toctree-l2"><a class="reference internal" href="internals.html#internal-organization-of-numpy-arrays">Internal organization of numpy arrays</a></li>
<li class="toctree-l2"><a class="reference internal" href="internals.html#multidimensional-array-indexing-order-issues">Multidimensional Array Indexing Order Issues</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="swig.html">NumPy and SWIG</a><ul>
<li class="toctree-l2"><a class="reference internal" href="swig.interface-file.html">numpy.i: a SWIG Interface File for NumPy</a></li>
<li class="toctree-l2"><a class="reference internal" href="swig.testing.html">Testing the numpy.i Typemaps</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="acknowledgements">
<h2>Acknowledgements<a class="headerlink" href="#acknowledgements" title="Permalink to this headline">¶</a></h2>
<p>Large parts of this manual originate from Travis E. Oliphant’s book
<a class="reference external" href="https://archive.org/details/NumPyBook">Guide to NumPy</a> (which generously
entered Public Domain in August 2008). The reference documentation for many of
the functions are written by numerous contributors and developers of
NumPy.</p>
</div>
</div>


          </div>
        </div>
          </div>
        </div>
      </div>
    </div>

    <div class="container container-navbar-bottom">
      <div class="spc-navbar">
        
      </div>
    </div>
    <div class="container">
    <div class="footer">
    <div class="row-fluid">
    <ul class="inline pull-left">
      <li>
        &copy; Copyright 2008-2019, The SciPy community.
      </li>
      <li>
      Last updated on Feb 20, 2020.
      </li>
      <li>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 2.4.2.
      </li>
    </ul>
    </div>
    </div>
    </div>
  </body>
</html>